package com.songdian.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class TopicMessageListener {

    @RabbitListener(queues = "topic_queue")
    public void receive(String id){
        System.out.println("消费者1，已完成消息处理业务(topic_queue0)======="  + id);
    }

    @RabbitListener(queues = "topic_queue")
    public void receive1(String id){
        System.out.println("消费者2，已完成消息处理业务(topic_queue1)======="  + id);
    }

    @RabbitListener(queues = "topic_queue2")
    public void handle(String id){
        System.out.println("消费者3，已完成消息处理业务(topic_queue2)======="  + id);
    }
}
